package org.rslai.tcedit.domain;

import javax.persistence.*;

import org.hibernate.validator.*;

/**
 * 用户详细信息
 * 
 * @author rslai
 */
@Entity
@Table(name="t_user_details")
public class UserDetails extends UUIDSupport{

    private String address;	// 家庭住址
    private String zip;	// 邮编
    private String telephone;	// 电话
    private String mobile;	// 手机
    private String education; // 教育背景
    private String employment; // 工作经历
    private String project; // 项目经验

    public UserDetails() { }

    @Column(nullable=true, length=100)
    @Length(max=100, message="地址请限制在100字以内")
    public String getAddress() { return address; }
    public void setAddress(String address) { this.address = address; }

    @Column(nullable=true, length=10)
    @Pattern(regex="[0-9]{6}", message="邮政编码应该为6个数字")
    public String getZip() { return zip; }
    public void setZip(String zip) { this.zip = zip; }

    @Column(nullable=true, length=20)
    @Pattern(regex="[0-9\\-\\(\\) ]{6,20}", message="错误的电话号码（示例：010-12345678）")
    public String getTelephone() { return telephone; }
    public void setTelephone(String telephone) { this.telephone = telephone; }

    @Column(nullable=true, length=20)
    @Pattern(regex="[0-9]{11,17}", message="错误的手机号码（示例：13500000001）")
    public String getMobile() { return mobile; }
    public void setMobile(String mobile) { this.mobile = mobile; }

    @Column(nullable=true, length=3000)
    @Length(max=3000, message="教育背景请限制在3000字以内")
    public String getEducation() { return education; }
    public void setEducation(String education) { this.education = education; }

    @Column(nullable=true, length=3000)
    @Length(max=3000, message="工作经历请限制在3000字以内")
    public String getEmployment() { return employment; }
    public void setEmployment(String employment) { this.employment = employment; }

    @Column(nullable=true, length=3000)
    @Length(max=3000, message="项目经验请限制在3000字以内")
    public String getProject() { return project; }
    public void setProject(String project) { this.project = project; }

}
